#include<stdio.h>
#include<string.h>

int main(void)
{
    int count;
    scanf("%d",&count);
    for (size_t i = 0; i < count; i++)
    {
        char ch1[20],ch2[20],ch3[20];

        scanf("%s",ch1);
        scanf("%s",ch2);
        int k = 0;
        for (int j = 0; j < strlen(ch1); j++)
        {
            if (j==strlen(ch1)/2)
            {
                for (int l = 0; l < strlen(ch2); l++)
                {
                    ch3[k] = ch2[l];
                    k++;
                }
            }
            ch3[k] = ch1[j];
            k++;            
        }
        printf("%s\n",ch3);
    }
    
}